﻿@model Rostfritt.Core.Entities.Customer

@{
    ViewBag.Title = "Kunder - Lägg till ny";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Kunder - Lägg till ny</h2>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true, "Något gick fel, vänligen åtgärda nedan angivna fel!")

<table>
    <tr>
        <th>
            @Html.LabelFor(m => Model.CustomerName)
        </th>
        <th>
            @Html.LabelFor(m => Model.Address)
        </th>
        <th>
            @Html.LabelFor(m => Model.City)
        </th>
    </tr>
    <tr>
        <td>
            @Html.EditorFor(m => Model.CustomerName)
            @Html.ValidationMessageFor(m => Model.CustomerName)
        </td>
        <td>
            @Html.EditorFor(m => Model.Address)
            @Html.ValidationMessageFor(m => Model.Address)
        </td>
        <td>
            @Html.EditorFor(m => Model.City)
            @Html.ValidationMessageFor(m => Model.City)
        </td>
    </tr>
    <tr>
        <th>
            @Html.LabelFor(m => Model.ZipCode)
        </th>
        <th>
            @Html.LabelFor(m => Model.Country)
        </th>
    </tr>
    <tr>
        <td>
            @Html.EditorFor(m => Model.ZipCode)
            @Html.ValidationMessageFor(m => Model.ZipCode)
        </td>
        <td>
            @Html.EditorFor(m => Model.Country)
            @Html.ValidationMessageFor(m => Model.Country)
        </td>
    </tr>
</table>

<input type="submit" value="Lägg till" />
}
